package com.lagou.order.fegin;

import com.lagou.common.pojo.Goods;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

/**
 * 自定义Fegin接口，调用Product微服务的所有接口方法都在此进行定义
 */
@FeignClient(name = "lagou-service-goods",fallback = GoodsFeignFallBack.class)
public interface GoodsFeign {
    /**
     * 通过商品id查询商品对象
     * @param ids
     * @return
     */
    @GetMapping("/good/queryByIds")
    public List<Goods> queryByIds(@RequestBody List<Integer> ids);
}
